#!/usr/bin  python
# _*_ coding:utf-8 _*_
"""
----------------------------------
    File Name: medications
    Description:
        Author: lhw
        Date: 2020/9/8
-----------------------------------
"""

from rest_framework import serializers
from Baby import models


class MedicationsModelSerializer(serializers.ModelSerializer):
    class Meta:
        model = models.Medications
        fields = ("id", "babies", "name", "notes", "hospital", "update_time")
        extra_kwargs = {
            "id": {
                "read_only": True
            },
            "update_time": {
                "read_only": True
            }
        }